<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<!-- HTML file produced from file: manual.tex --
 -- using Hyperlatex v 2.3.1 (c) Otfried Cheong--
 -- on Emacs 21.4 (patch 12) "Portable Code" XEmacs Lucid, Wed Jun  2 18:57:10 2004 -->
<HEAD>
<TITLE>Scheme 48 Manual -- Adding external modules to the <TT>Makefile</TT></TITLE>

</HEAD><BODY BGCOLOR="#ffffff">
<EM>Scheme 48 Manual</EM> | <A HREF="s48manual.html#top_node">Contents</A> | In Chapter: <A HREF="s48manual_65.html">Mixing Scheme 48 and C</A><BR>Previous: <A HREF="s48manual_69.html">Adding external modules to the <TT>Makefile</TT></A> | Next: <A HREF="s48manual_69.html">Adding external modules to the <TT>Makefile</TT></A>
<H2>Adding external modules to the <TT>Makefile</TT></H2>

<P>Getting access to C bindings from Scheme requires that the C code be
 compiled and linked in with the Scheme&nbsp;48 virtual machine and that the
 relevant shared bindings be created.
The Scheme&nbsp;48 makefile has rules for compiling and linking external code
 and for specifying initialization functions that should be called on
 startup.
There are three <CODE>Makefile</CODE> variables that control which external modules are
 included in the executable for the virtual machine (<CODE>scheme48vm</CODE>).
<CODE>EXTERNAL_OBJECTS</CODE> lists the object files to be included in
 <CODE>scheme48vm</CODE>,
<CODE>EXTERNAL_FLAGS</CODE> is a list of <CODE>ld</CODE> flags to be used when
 creating <CODE>scheme48vm</CODE>, and
 <CODE>EXTERNAL_INITIALIZERS</CODE> is a list of C procedures to be called
 on startup.
The procedures listed in <CODE>EXTERNAL_INITIALIZERS</CODE> should take no
 arguments and have a return type of <CODE>void</CODE>.
After changing the definitions of any of these variables you should
 do <CODE>make scheme48vm</CODE> to rebuild the virtual machine.
<P><P>
  
Previous: <A HREF="s48manual_69.html">Adding external modules to the <TT>Makefile</TT></A> | Next: <A HREF="s48manual_69.html">Adding external modules to the <TT>Makefile</TT></A></BODY></HTML>
